\section{union --- Union of two sets}
\label{fn:union}
\index{union()}
\index{set!union}
\index{union of two sets}
\begin{rail}
Union : 'union' '(' Matrix ',' Matrix ')' ;
\end{rail}

The \verb+union+ function returns a vector set that is the union of the
two sets supplied as arguments.  A set is just a row or column vector.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+union.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+union.r+ may make this function unavailable.


\paragraph{Example}
\index{example of union()}
\index{union()!example}
\begin{verbatim}
> a = 1:3
 a =
        1          2          3  
> b = [2,5,8,-2]
 b =
        2          5          8         -2  
> union(a,b)
       -2          1          2          3          5          8 
\end{verbatim}

See also: Page~\pageref{fn:complement} \verb+complement()+,
Page~\pageref{fn:intersection} \verb+intersection()+,
Page~\pageref{fn:set} \verb+set()+.

\newpage



